Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additionalCargoLock argument #328

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

bouk
Copy link
Contributor

@bouk bouk commented Jun 18, 2024

This allows for an extra Cargo.lock, which is useful when using build-std to ensure the requires crates are available.

Related to: #146

This can be used like:

naersk.buildPackage {
  ...
  additionalCargoLock = ./rust-std-Cargo.lock;
}

Which will then ensure all the sources that are required to build rust-std are included. The Cargo.lock can be found at https://github.com/rust-lang/rust/blob/master/Cargo.lock

This allows for an extra Cargo.lock, which is useful when using
build-std to ensure the requires crates are available.

Related to: nix-community#146
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/build-rust-app-using-cargos-build-std-feature-with-naersk-fails-because-rust-src-is-missing/13161/11

Copy link
Collaborator

@nmattia nmattia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@nmattia nmattia merged commit 941ce6d into nix-community:master Jun 18, 2024
5 checks passed
@bouk bouk deleted the bouk/additional-cargo-lock branch September 24, 2024 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants